﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace Agile.Engine.View
{
    public interface IView
    {
        /// <summary>
        /// 视图默认数据模型
        /// </summary>
        Hashtable ViewModel { get; set; }
        /// <summary>
        /// 控制器
        /// </summary>
        IViewProvider ViewProvider { get; set; }

        /// <summary>
        /// 控件初始化
        /// </summary>
        void InitializeViewUI();
        /// <summary>
        /// 初始化数据绑定
        /// </summary>
        void InitializeBinding();

        /// <summary>
        /// 画面状态
        /// </summary>
        ViewState ViewState { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        string Message { get; set; }

        /// <summary>
        /// 关键字
        /// </summary>
        string KeyWords { get; set; }

        /// <summary>
        /// 执行结果
        /// </summary>
        object ViewResult { get; set; }
    }

    public enum ViewState
    {
        /// <summary>
        /// 查看模式
        /// </summary>
        View,
        /// <summary>
        /// 新增模式
        /// </summary>
        AddNew,
        /// <summary>
        /// 编辑模式
        /// </summary>
        Modify
    }

    //public abstract class View : IView
    //{
    //    public Hashtable QueryModel { get; set; }

    //    public Hashtable ViewModel { get; set; }

    //    public IViewProvider ViewProvider { get; set; }

    //    public ViewState ViewState { get; set; }

    //    public string Message { get; set; }

    //    public abstract void InitializeViewUI();

    //    public abstract void InitializeBinding();


    //    public string KeyWords { get; set; }
    //}

}
